import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app/blocs/network_connectivity_bloc/network_connectivity_bloc.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_app/widgets/network_connectivity_widget/alert_network_change_message.dart';

class Login extends StatefulWidget {
  @override
  _LoginState createState()=>_LoginState();
}
class _LoginState extends State<Login> with SingleTickerProviderStateMixin{
  NetWorkConnectivityBloc _netWorkConnectivityBloc;
  @override
  void initState() {
    // TODO: implement initState
    _netWorkConnectivityBloc=BlocProvider.of<NetWorkConnectivityBloc>(context);
    super.initState();
  }
  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          Positioned(
            top: 0,
            bottom: 0,
            right: 0,
            left: 0,
            child: Text('login'),
          ),
          Positioned(
            top: 0,
            bottom: 0,
            right: 0,
            left: 0,
            child: BlocBuilder<NetWorkConnectivityBloc,NetWorkConnectivityState>(
              builder: (context,state){
                return AlertNetWorkChangeMessage(ncState: state);
              },
            ),
          ),
        ],
      ),
    );
  }
}